package com.swt.testdemo.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;

/**
 * @author BleethNie
 * @version 1.0
 * @date 2020/11/12 11:43
 **/
@Data
@ApiModel(value = "用户日志频次统计表单")
public class UserLogRateForm {

    @ApiModelProperty(value = "页码",example = "1")
    @Min(1)
    private Integer page;

    @ApiModelProperty(value = "每页数量",example = "10")
    @Range(min = 5,max = 50,message = "每页数量必须在5到50页之间")
    private Integer limit;

    @ApiModelProperty(value = "频率 HOUR DAY WEEK MONTH 默认是HOUR ",example = "HOUR")
    @NotEmpty
    private String rateType;

    public static final  String  RATE_TYPE_HOUR ="HOUR";

    public static final String RATE_TYPE_DAY ="DAY";

    public  static final String RATE_TYPE_WEEK ="WEEK";

    public static final String RATE_TYPE_MONTH ="MONTH";




}
